package com.ruoyi.partybuilding.common.EQuery;

import com.easy.query.core.annotation.Column;
import com.easy.query.core.annotation.EasyWhereCondition;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public abstract class CreateByEntity<T extends Comparable<T> & Serializable> implements IEQueryEntity<T>, ICreatorIdEntity.ICreateBy {

    @Data
    public static class LongId extends CreateByEntity<Long> {

        @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
        @Column(primaryKey = true,generatedKey = true)
        Long id;
    }

    /**
     * 创建者
     */
    @ApiModelProperty("创建人名称")
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime=new Date();
}
